package com.example.tests;

public class ContactObject {
	public String id;
	public String firstName;
	public String lastName;
	public String fullName;
	public String mainAddress;
	public String homeTel;
	public String mobileTel;
	public String workTel;
	public String mainMail;
	public String otherMail;
	public String newGroup;
	public String birthDay;
	public String birthMonth;
	public String birthYear;
	public String otherAddress;
	public String otherPhone;
	
	public ContactObject setId(String id) {
		this.id = id;
		return this;
	}
	public ContactObject setFirstName(String firstName) {
		this.firstName = firstName;
		return this;
	}
	public ContactObject setLastName(String lastName) {
		this.lastName = lastName;
		return this;
	}
	
	public ContactObject setFullName(String fullName) {
		this.fullName = fullName;
		return this;
	}
	
	public ContactObject setMainAddress(String mainAddress) {
		this.mainAddress = mainAddress;
		return this;
	}
	public ContactObject setHomeTel(String homeTel) {
		this.homeTel = homeTel;
		return this;
	}
	public ContactObject setMobileTel(String mobileTel) {
		this.mobileTel = mobileTel;
		return this;
	}
	public ContactObject setWorkTel(String workTel) {
		this.workTel = workTel;
		return this;
	}
	public ContactObject setMainMail(String mainMail) {
		this.mainMail = mainMail;
		return this;
	}
	public ContactObject setOtherMail(String otherMail) {
		this.otherMail = otherMail;
		return this;
	}
	public ContactObject setNewGroup(String newGroup) {
		this.newGroup = newGroup;
		return this;
	}
	public ContactObject setBirthDay(String birthDay) {
		this.birthDay = birthDay;
		return this;
	}
	public ContactObject setBirthMonth(String birthMonth) {
		this.birthMonth = birthMonth;
		return this;
	}
	public ContactObject setBirthYear(String birthYear) {
		this.birthYear = birthYear;
		return this;
	}
	public ContactObject setOtherAddress(String otherAddress) {
		this.otherAddress = otherAddress;
		return this;
	}
	public ContactObject setOtherPhone(String otherPhone) {
		this.otherPhone = otherPhone;
		return this;
	}
	
	public String getFirstName() {
		return firstName;
	}
	public String getLastName() {
		return lastName;
	}
	
	public String getFullName() {
		return fullName;
	}
	
	@Override
	public String toString() {
		return "ContactObject [" + id + ":" + fullName
				+ "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result	+ ((fullName == null) ? 0 : fullName.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactObject other = (ContactObject) obj;
		if (fullName == null) {
			if (other.fullName != null)
				return false;
		} else if (!fullName.equals(other.fullName))
			return false;
		if (id != null && other.id != null) {
			return id.equals(other.id);
		}
		return true;
	}
}
